home *** CD-ROM | disk | FTP | other *** search
- Path: keats.ugrad.cs.ubc.ca!not-for-mail
- From: c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku)
- Newsgroups: comp.lang.c
- Subject: Re: Help me with "time --> int"
- Date: 12 Apr 1996 11:45:49 -0700
- Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
- Message-ID: <4km8ctINNlm@keats.ugrad.cs.ubc.ca>
- References: <316E5672.773E@uniag.sk>
- NNTP-Posting-Host: keats.ugrad.cs.ubc.ca
-
- In article <316E5672.773E@uniag.sk>, FVS PEF <fvspef@uniag.sk> wrote:
- >Sorry for stupid question, but:
- >"Can you help me, what is the easiest way to get day of the month and
- >number of month (1-12) into integer ?
- >
- >I studied localtime, but without any success.
-
- What exactly did you study about localtime()? You must have overlooked its
- return value, which is a pointer to a structure (struct tm *) that gives you a
- broken down date.
-
- One of its fields is an integer member (tm_month) representing the month of the
- year. Alas, is is 0 to 11 not 1 to 12, but I leave that as an exercise...
-
- > steve
- >
- >PS : Please, use my e-mail : billik@sun.uniag.sk
- >PS1: SunOS 5.4
-
- You mean, ``Solaris''. :)
- --
-
-